{% load sptags %}
<template id="v_id_{{ name }}">
    <div>
        <input type="hidden" name="{{ raw_name }}" v-model="{{ name }}">

       <el-date-picker
        v-model="{{ name }}"
        {{ attrs |safe }}
        type="datetime"
        value-format="yyyy-MM-dd HH:mm:ss"
        format="yyyy-MM-dd HH:mm:ss"
        :picker-options="options"
        placeholder="{{ verbose_name }}">
       </el-date-picker>


    </div>
</template>
<script type="text/javascript">
    var app_{{ name }} = new Vue({
        el: '#v_id_{{ name }}',
        data: {
            '{{ name }}': '{{ value|date:'Y-m-d H:i:s' }}',
            options:{{ picker_options|safe }}
        }
    });
</script>